<!doctype html>
<html lang="en">
<head>
    <!-- css 文件列表 -->
    <?php include './inc/css.html'; ?>

    <style type="text/css">
    html,body{
        height:100%;
    }

    .wrap{
        padding-bottom:.55rem;
    }

    .userinfo{
        height:2rem;
        /*padding:.1rem 0;*/
    }

    .userinfo .user-base{
        width:100%;
        height:2rem;
        background-position: center center;
        background-size: cover;
        background-repeat: no-repeat;
    }
    .userinfo .user-base .u-base-avatar {
        height: .8rem;
        width:.8rem;
        border-radius: 50%;
        background-position: center center;
        background-size: contain;
        background-repeat: no-repeat;
        border:3px solid transparent;

    }    
    .userinfo .user-base .u-base-title {
        line-height:.3rem;
        height: .3rem;
        font-weight: bold;
    }
    .userinfo .user-base .u-base-subtitle{
        line-height:.2rem;
        height: .2rem;
        font-size:80%;
    }


    #message {height: .3rem;}
    #message .swiper-slide{
        height: .3rem;
        line-height: .3rem;
        text-indent: 15px;
    }
    .myfav{
        line-height: .4rem;
        padding:0 15px;
    }
    .cover{
        /*opacity: .2;*/
    }
    .gocenter{
        line-height: .4rem;
        padding:0 15px;
    }
    .teacherlogin .teachercenter{
        padding:0 15px;
        line-height: .4rem;
    }

    .closeteacher{
        font-size:200%;
    }
    .teacherlogin input{
        border: none;
        border-bottom: 1px solid transparent;
        box-shadow: none;
        border-radius: 0;
    }
    .setting{
        right:.1rem;
        top:.1rem;
    }
    .coversetting{
        top:0;
        right: 0;
        background: none;
        padding:0;
    }
    .settinglist{
        padding-top: .5rem;
        line-height: .3rem;
    }

    .settinglist .settingitem{
        
    }
    .coversetting .closesetting{
        position: absolute;
        width: .5rem;
        height: .5rem;
        font-size: 200%;
        text-align: center;
        top: .13rem;
        right: -200%;
        opacity: 0;
    }

    .coversetting .closesetting.showclosesetting{

        right: .05rem;
        opacity: 1;
        color: var( --orange900 ) !important;

    }


    </style>

</head>
<body class="_bg_light">
<div class="floaticon _bg_light _text_primary setting ion-gear-a"></div>

<div class="cover"></div>
<div class="coversetting _text_barely tc">
    <p class="closesetting tran3"><i class="ion-ios-close-outline"></i></p>
    <ul class="settinglist tr">
        <li class="settingitem m15 feedback"><i class="ion-ios-compose-outline"></i> 功能建议</li>
        <li class="settingitem m15 logout"><i class="ion-log-out"></i> 退出账号</li>
    </ul>
</div>
<div class="coverteacher">
<div class="teacherlogin">
    <div class="between teachercenter">
        <span></span>
        <span> 教师登录</span>
        <span class="closeteacher ion-ios-close-empty"></span>
    </div>
    <div class="line1"></div>
    <form class="form-horizontal" role="form">
    <div class="form-group">
        <div class="col-xs-12">
            <input type="password" class="form-control _border_light" name="tpassword" id="tpassword" value="test" placeholder="教师登录密码">
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-12">
            <button type="submit" id="login" class="btn btn-block btn-success">登录</button>
        </div>
    </div>
    </form>
</div>
</div>

<div class="wrap">

<div class="userinfo tc">
    <div class="user-base v center" style="background-image:url('./../assets/img/patterns/1.png')">
        <div class="u-base-avatar _border_white _bg_light" style="background-image:url('./../assets/img/logo.png')"></div>
        <p class="u-base-title _text_teriary oneline">小小的少年</p>
        <p class="u-base-subtitle _text_barely oneline">独立自主,专业吃土</p>
    </div>
</div>

<div class="line1 dn"></div>
<div id="message" class="swiper-container dn">
    <div  class="swiper-wrapper">
        <div class="swiper-slide">消息通知消息通知消息通知</div>
        <div class="swiper-slide">就业信息就业信息就业信息</div>
    </div>
</div>

<div class="line1"></div>
<div class=" myfav _bg_white">
    <a class="between" href="./fav.php?t=1">
        <span class="ion-ios-heart-outline"> 我的收藏</span>
        <span class="ion-ios-arrow-right"></span>
    </a>
</div>
<div class="line1"></div>
<div class=" myfav _bg_white">
    <a class="between" href="./courseware.php">
        <span class="ion-paperclip"> &nbsp;&nbsp;课件中心</span>
        <span class="ion-ios-arrow-right"></span>
    </a>
</div>
<div class="line1"></div>
<div class="_bg_white between gocenter">
    <span></span>
    <span class="goteacher ion-ios-lightbulb-outline"> 教师中心</span>
    <span class="closeteacher ion-ios-close-empty"></span>
</div>
<div class="line1"></div>
</div>

<!-- 底部tab导航 -->
<?php include './inc/nav.html'; ?>

</body>

<?php include './inc/js.html'; ?>

<script type="text/javascript">

$(function(){

      var messageSwiper = new Swiper ('#message', {
        autoplay:3000,
        autoplayDisableOnInteraction:false,
        direction:"vertical",
        loop:true

      }) ;

      $('.feedback').on('click',function(){

        layer.msg('您可以在微信公众号后台 给我们留言哟,谢谢!')
        // layer.open({
        //   type: 1,
        //   shade: false,
        //   title: false, //不显示标题
        //   content: $('.wrap'), //捕获的元素，注意：最好该指定的元素要存放在body最外层，否则可能被其它的相对元素所影响
        //   cancel: function(){
        //     layer.msg('捕获就是从页面已经存在的元素上，包裹layer的结构', {time: 5000, icon:6});
        //   }
        // });


      })

      $('.logout').on('click',function(){
        layer.confirm('您确定要退出当前账号吗?', {
          btn: ['是的','再想想'] //按钮
        }, function(){
            // 点击yes
            
                // $.post('/index.php/WebApp/Users/logout',{} ,function(result){
                //     var result = JSON.parse(result);
                //     if(!result.errcode){
                //         layer.msg(result.errmsg,{"time":1000});
                //     }else{
                //         layer.msg(result.errmsg,{"time":1000},function(){
                //           // 退出成功,跳转到登录页面
                //           //window.location.href='';
                //         });
                //     }
                // })
           
               window.location.href='./login.php'; 
            

        }, function(){
            // 点击no

        });
      })

    $('.goteacher').on('click',function(){
        $('.cover').addClass('l0');
        $('.coverteacher').addClass('l0');
    })



    $('.setting').on('click',function(){
        $('.cover').addClass('l0');
        $('.coversetting').addClass('l0');
        $('.closesetting').addClass('showclosesetting');//设置关闭按钮
    })


    $('.cover,.closeteacher,.closesetting').on('click',function(){
        $('.cover').removeClass('l0');
        $('.coverteacher').removeClass('l0');
        $('.coversetting').removeClass('l0');
        $('.closesetting').removeClass('showclosesetting');
    })


    $('.coverteacher').on('click',function(e){
        e.stopPropagation();
    })



    $('#login').on('click',function(e){
        e.preventDefault();

        var tpassword = $.trim($('input[name=tpassword]').val());

        if(tpassword.length==0){
            layer.msg('请填写教师登录密码');
            return;
        }


        var data = {
            "tpassword":$.md5(tpassword)
        };


        // $.post('/index.php/WebApp/Users/checkTeacher',data ,function(result){
        //     var result = JSON.parse(result);
        //     if(!result.errcode){
        //         layer.msg(result.errmsg,{"time":1000});
        //     }else{
        //         layer.msg(result.errmsg,{"time":1000},function(){
        //           // 登录成功,跳转到教师中心
        //           //window.location.href='';
        //         });
        //     }
        // })



        layer.confirm('登录成功,进入教师中心?', {icon: 1, title:'提示'}, function(index){
          //do something
          $('.cover').click();
          layer.close(index);
          setTimeout(function(){
            window.location.href="./teachercenter.php";
        },500);
          
        });
        
    })

})
</script>

</html>